

import { GetAction, PostAction } from './request'

export const Ajax = {
    getBanner: (data?: any) => GetAction('http://121.196.235.163:3000/banner', data),

    register: (data?: any) => PostAction('/react/register', data),

    login: (data?: any) => PostAction('/react/login', data),

    checkPhone: (data?: any) => PostAction('/react/chechphone', data),

    // 发送验证码
    sendCaptcha: (data?: any) => GetAction('http://121.196.235.163:3000/captcha/sent', data),

    // 校验验证码
    verifyCaptcha: (data?: any) => GetAction('http://121.196.235.163:3000/captcha/verify', data),


    gettoken: (data?: any) => PostAction('/react/gettoken', data),


    changepass: (data?: any) => PostAction('/react/changepass', data),

    getuserinfo: (data?: any) => PostAction('/react/getuserinfo', data),

    uploadfile: (data?: any) => PostAction('/react/uploadfile', data),

    changeuserinfo: (data?: any) => PostAction('/react/changeuserinfo', data),

    getMaiData: (data?: any, headers?: any) => GetAction('https://m.maizuo.com/gateway', data, headers),

    getmaizuo: (data?: any, headers?: any) => GetAction('/react/maizuo', data, headers),

    goodbanners: (data?: any, headers?: any) => GetAction('/react/goodbanners', data, headers),

    getgoods: (data?: any, headers?: any) => GetAction('/react/getgoods', data, headers),

    getgoodone: (data?: any, headers?: any) => PostAction('/react/getgoodone', data, headers),

    getgooddata: (data?: any, headers?: any) => GetAction('/react/getgooddata', data, headers),

    // 购物车
    addtocart: (data?: any, headers?: any) => PostAction('/react/addtocart', data, headers),

    getcartlist: (data?: any, headers?: any) => PostAction('/react/getcartlist', data, headers),


    // 点赞收藏
    getlikesdata: (data?: any, headers?: any) => PostAction('/react/getlikesdata', data, headers),

    // getlikesdatabyphone:(data?:any,headers?:any)=>PostAction('/react/getlikesdata',data,headers ),
    getlikesdatabyphone: (data?: any, headers?: any) => PostAction('/react/getlikesdatabyphone', data, headers),

    addlikes: (data?: any, headers?: any) => PostAction('/react/addlikes', data, headers),

    deletelikes: (data?: any, headers?: any) => PostAction('/react/deletelikes', data, headers),

    // 评论
    getcomments: (data?: any, headers?: any) => PostAction('/react/getcomments', data, headers),

    deletecoment: (data?: any, headers?: any) => PostAction('/react/deletecoment', data, headers),

    addcoments: (data?: any, headers?: any) => PostAction('/react/addcoments', data, headers),

    // 购物车
    updatecarts: (data?: any, headers?: any) => PostAction('/react/updatecarts', data, headers),

    deletecarts: (data?: any, headers?: any) => PostAction('/react/deletecarts', data, headers),

}